<body onload="getTableCartManager(1); getPage();">
<div class="container-fluid" style="margin-top: 30px">
    <div class="row">
        <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12 hidden-xs" style="text-align: center"></div> <!-- lg: >= 1200px, md:desk,lap, sm:tablet, xs:phone -->
        <div class="col-lg-10 col-md-10 col-sm-8 col-xs-12">
            <div class="row" style="padding: 20px;" id="divInfoNews">
                <a href="<?php echo base_url() ?>cart"><span style="font-weight: bold; font-size: 20px; color: green">GIỎ HÀNG </span></a>
            </div>
            <div class="row" style="margin: 10px; border-top: 1px solid #fff; padding: 5px;" id="divTableCartManager"></div>
            <div class="row" style="text-align: center;">
                <div class="col-lg-4">
                    <span><i>*Tỷ giá USD/VND hiện tại: <?php echo number_format($rate) ?></i></span>
                </div>
                <div class="col-lg-4">
                    <span><b>Tổng số tiền thanh toán: &nbsp <label id="labelMoneyCartTable"><?php echo $totalMoney ?></label> VND</b></span>
                </div>
                <div class="col-lg-4">
                    <button type="button" class="btn btn-primary">Thanh toán</button>
                </div>
            </div>
            <div class="row" style="margin: 10px; border-top: 1px solid #fff; padding: 5px;" id="pageCart"></div>
        </div>
        <div class="col-lg-1 col-md-1 col-sm-1 col-xs-12 hidden-xs" style="text-align: center"></div>
    </div>
</div>
</body>

<script>
    function getTableCartManager(i){
        var url = "<?php echo base_url() ?>";
        $('#divTableCartManager').load(url+"home/getTableCartManager/"+i);
    }
</script>

<script>
    function prev(){
        var page = ($('#list li.active').index()-1); <!-- lay index cua li dang gan lop active -->
        $('#'+page).click();
    }

    function next(){
        var page = ($('#list li.active').index()+1);
        $('#'+page).click();
    }

    function getPage(){
        var url = "<?php echo base_url() ?>";
        $.ajax({
            url: url+"home/getPageCart",
            success: function(x){
                //alert(x);
                $('#pageCart').html(x);
            }
        });
    }
</script>